using System;
using System.Collections.Generic;
using System.Text;
using MeetingRoom.Domain;
using MeetingRoom.Data;
using MeetingRoom.Data.Implementation;
using NUnit.Framework;

namespace MeetingRoom.Test
{
    [TestFixture]
    public class Program
    {
        [Test]
        public void TestDuration()
        {
            Duration d1 = new Duration(
                new DateTime(2007, 1, 13, 2, 0, 0), new DateTime(2007, 1, 14, 4, 0, 0));
            Duration d2 = new Duration(
                new DateTime(2007, 1, 13, 1, 0, 0), new DateTime(2007, 1, 14, 3, 0, 0));
            Duration d3 = new Duration(new DateTime(2007, 2, 10), new DateTime(2007, 2, 20));
            Duration d5 = new Duration(new DateTime(2007, 1, 12), new DateTime(2007, 1, 15));
            Duration d6 = new Duration(new DateTime(2007, 1, 12), new DateTime(2007, 1, 15));

            Assert.IsTrue(d1.Intersect(d2));
            Assert.IsFalse(d1.Intersect(d3));
            Assert.IsTrue(d1.Intersect(d5));
            Assert.IsTrue(d1.Intersect(d6));
        }
    }
}
